<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html {
            font-size: 18px;
        }
        
        .father {
            font-size: 50px;
        }
        
        .son {
            font-size: 1em;
            /* em这个显示50px大小跟父盒子大小一样 */
            /* rem是根据根（html）字号大小的，适合于移动端，每个移动端都有一个根字号 */
        }
    </style>
</head>

<body>
    <div class="father">
        <div class="son">我们来测试em和rem的区别</div>
    </div>
</body>

</html>